import tkinter as tk
from VarBind import VarBind
class barFrame(tk.Frame):
    def __init__(self,*args,**kwards):
        super().__init__(*args,**kwards)
        self._design()
    def _design(self):
        self.b_clear_recv=tk.Button(self,text="清接收区")
        self.b_clear_send=tk.Button(self,text="清发送区")
        self.b_open_file=tk.Button(self,text="打开文件")
        self.e_open_file=tk.Entry(self)
        self.b_send_file=tk.Button(self,text="发送文件")
        self.b_stop_file_send=tk.Button(self,text="停止")
        self.c_topmost=tk.Checkbutton(self,text="最前")
        self.b_hide=tk.Button(self,text="隐藏")
        self.b_hide_send_area=tk.Button(self,text="-")
        self._layout()
    def _layout(self):
        self.b_clear_recv.pack(side="left")
        self.b_clear_send.pack(side="left")
        self.b_open_file.pack(side="left")
        self.e_open_file.pack(side="left",fill=tk.X)
        self.b_send_file.pack(side="left")
        self.b_stop_file_send.pack(side="left")
        self.c_topmost.pack(side="left")
        self.b_hide.pack(side="left")
        self.b_hide_send_area.pack(side="left")
    def m_BindVar(self,var:VarBind):
        self.c_topmost.configure(variable=var.vardict_bool["topmost_bool"])

if __name__=="__main__":
    win = tk.Tk()

    xe = barFrame(win)
    xe.pack()

    win.mainloop()